package com.lxw.oa.service.serviceImpl;

import com.lxw.oa.entity.Role;
import com.lxw.oa.mapper.RoleMapper;
import com.lxw.oa.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("roleService")
@Transactional
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public List<Integer> getUserRoleIds(int userId) {
        return roleMapper.getUserRoleIds(userId);
    }

    @Override
    public List<Role> getRoles() {
        return roleMapper.getRoles();
    }
}
